<?
if (!defined('baseinfo')) {
    exitdata();
}   
?>
<?
  if($data['nowfeature']['isiframe']!=1)
   {
   ?>
<script src="<?=baseinfo?>/js/scriptsubmain.js"></script>

<?}?>
<script>
var ua = navigator.userAgent.toLowerCase();

var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
if(isAndroid) {
var rangedata=1000;
//alert((($(this).scrollTop() + $(this).innerHeight() ) +rangedata) +' '+$(this)[0].scrollHeight );
  // Do something!
  // Redirect to Android-site?
 // window.location = 'http://android.davidwalsh.name';
}else
{
var rangedata=200;

}

$( document ).ready(function() { 


     if($('#homeBnn .wrpImgBnnHome').html())
     {

     $('#homeBnn').royalSlider({
            arrowsNav: true,
            loop: true,
            keyboardNavEnabled: false,
            controlsInside: false,
            imageScaleMode: 'fill',
            arrowsNavAutoHide: false,
            autoScaleSlider: true, 
            autoScaleSliderWidth: 960,     
            autoScaleSliderHeight: 300,
            controlNavigation: 'bullets',
            thumbsFitInViewport: false,
            navigateByClick: true,
            startSlideId: 0,
            slidesSpacing:0,
            autoPlay: {enabled: true,stopAtAction:false,pauseOnHover: true,delay:5000},
            transitionType:'move',
            transitionspeed: 5000,
            imgWidth: 2048,
            imgHeight: 460,
          });
     }

   <?
 if($data['nowfeature']['istag']==1) 
 {
 ?>
    var jqxhr2 =getmaintagrow();
   jqxhr2.done(function() {
   
                                   // enddata=0;
                                    });
                                    <?
 }     
 else if($data['nowfeature']['isforum']==1)     
   {
   ?>
   var jqxhr2 =getmainproductforum();
   jqxhr2.done(function() {
   
                                   // enddata=0;
                                    });
   <?
   
   }
   else     if($data['nowfeature']['isiframe']!=1)
    {
                       
     ?>                   
      getbanner=1;        

 
 $(".wrpCell.mainCell").html('');
  if(getbanner)
  {
  var jqxhrcell =getbannercell();
  jqxhrcell.done(function() {
  var jqxhr =getmainproduct();
  
  jqxhr.done(function() {
  
  
                enddata=1;
                pagemain++;
                var jqxhr3 =getmainproduct();
                jqxhr3.done(function() {

         $('.wrpInMid.w960').bind('scroll', function()
                              {
                              
                              

                              
                                            // alert((($(this).scrollTop() + $(this).innerHeight() ) +rangedata) +' '+$(this)[0].scrollHeight );
                                if((($(this).scrollTop() + $(this).innerHeight() ) +rangedata) >= $(this)[0].scrollHeight)
                                {
                                  rangedata=rangedata+30;
                                  if(enddata==0)
                                  {
                                    enddata=1;
                                    pagemain++;
                                    var jqxhr2 =getmainproduct();
                                    jqxhr2.done(function() {
                                   // enddata=0;
                                    });
                                    //console.log('end reached');
                                  
                                  }
                                  
                                }
                              })
                              
                              
                });
                              
         });
  
  });
 
  }else
  {
  
  var jqxhr =getmainproduct();
  jqxhr.done(function() {
                
                
                enddata=1;
                pagemain++;
                var jqxhr3 =getmainproduct();
                jqxhr3.done(function() {
         $('.wrpInMid.w960').bind('scroll', function()
                              {
                              
                              
                                 //alert((($(this).scrollTop() + $(this).innerHeight() ) +rangedata)+' '+$(this)[0].scrollHeight );
                               if((($(this).scrollTop() + $(this).innerHeight() ) +rangedata) >= $(this)[0].scrollHeight)
                                {
                                  rangedata=rangedata+30;
                                  
                                  if(enddata==0)
                                  {
                                    enddata=1;
                                    pagemain++;
                                    var jqxhr2 =getmainproduct();
                                    jqxhr.done(function() {
                                  //  enddata=0;
                                    });
                                    //console.log('end reached');
                                  
                                  }
                                  
                                }
                              })
                              
                              
                });
                              
         
         
         });
  
  }
  

  
         
         
<?  }
   else
{
?>




<?


}
  
  ?>
         
  
 
 
 });
</script>